package com.grade.system.mapper;

import java.util.List;
import com.grade.system.domain.GradeItem;
import org.apache.ibatis.annotations.Param;

/**
 * 评分指标项Mapper接口
 * 
 * @author grade
 * @date 2021-10-17
 */
public interface GradeItemMapper 
{
    /**
     * 查询评分指标项
     * 
     * @param id 评分指标项主键
     * @return 评分指标项
     */
    public GradeItem selectGradeItemById(Long id);

    /**
     * 查询评分指标项列表
     * 
     * @param gradeItem 评分指标项
     * @return 评分指标项集合
     */
    public List<GradeItem> selectGradeItemList(GradeItem gradeItem);

    public List<GradeItem> selectItemAll();

    /**
     * 新增评分指标项
     * 
     * @param gradeItem 评分指标项
     * @return 结果
     */
    public int insertGradeItem(GradeItem gradeItem);

    /**
     * 修改评分指标项
     * 
     * @param gradeItem 评分指标项
     * @return 结果
     */
    public int updateGradeItem(GradeItem gradeItem);

    /**
     * 删除评分指标项
     * 
     * @param id 评分指标项主键
     * @return 结果
     */
    public int deleteGradeItemById(Long id);

    public int countGradeItemByTemplateIds(String[] templateIds);

    /**
     * 批量删除评分指标项
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteGradeItemByIds(String[] ids);

    void updateGradeTypeName(@Param("childrenList")List<Long>childrenList, @Param("updateItem")GradeItem updateGradeItem);

    void updateGradeTypeWeight(GradeItem gradeItem);
    int updateGradeDeductFlag(GradeItem gradeItem);

    int updateGradeWeightById(GradeItem gradeItem);
    public List<GradeItem> selectByTempalteIdTypeIds(@Param("childrenList")List<Long>childrenList, @Param("updateItem")GradeItem updateGradeItem);

    int updateGradeItemByTypeId(GradeItem gradeItem);

    public List<GradeItem> selectGradeItemByTemplateId(Long templateId);

    public List<GradeItem> selectGradeItemByTypeId(Long typeId);
}
